Skip to content

super_errors: run fixtures in parallel#8430

Open
JonoPrest wants to merge 2 commits into
rescript-lang:masterfrom
JonoPrest:jono/parallelize-super-error-runner
Open

super_errors: run fixtures in parallel#8430
JonoPrest wants to merge 2 commits into
rescript-lang:masterfrom
JonoPrest:jono/parallelize-super-error-runner

Conversation

@JonoPrest
Copy link
Copy Markdown
Contributor

Each fixture spawns a bsc process and the previous for ... await loop ran them sequentially, so wall time scaled linearly with fixture count. Replace with a fixed-size worker pool (os.availableParallelism() workers) and sort the fixture list for deterministic failure output.

Locally on 264 fixtures this cuts the suite from ~2.2s to ~0.9s (~2.4x). The original 2019 implementation was also parallel; the sequential loop was a side-effect of the ESM/async-await refactor in #6899, which explicitly noted it wasn't refactoring tests.

Each fixture spawns a `bsc` process and the previous `for ... await`
loop ran them sequentially, so wall time scaled linearly with fixture
count. Replace with a fixed-size worker pool (`os.availableParallelism()`
workers) and sort the fixture list for deterministic failure output.

Locally on 264 fixtures this cuts the suite from ~2.2s to ~0.9s
(~2.4x). The original 2019 implementation was also parallel; the
sequential loop was a side-effect of the ESM/async-await refactor
in rescript-lang#6899, which explicitly noted it wasn't refactoring tests.
@JonoPrest JonoPrest requested a review from cknitt May 18, 2026 14:00
@JonoPrest
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant